package huangbiao;
/*
 * 数组的遍历,替换，升序排序。
 */
import java.util.Arrays;
public class practice {//practice：练习
	public static void main(String[] args) {
           //是先将多维数组看作一个整体，然后再分别遍历其中的个体
		int a[][]=new int [][] {{3,4},{5,1,5},{4,8,6}};
		
            for(int b=0;b<=a.length-1;b++) {
            	for(int c=0;c<=a[b].length-1;c++) {
            		System.out.print(a[b][c]+",");
            	} 
            }
            System.out.println();
            for(int d[]:a) {
            	for(int c:d) {
            		System.out.print(c+",");
            	}
            }
            System.out.println();
            int f[]=new int[]{4,6,7,8,9};
            Arrays.fill(f,6);
          for(int d=0;d<=f.length-1;d++) {
        	  System.out.print(f[d]+",");
          }
          System.out.println();
          int h[]=new int[] {4,6,7,5,4,3,2,1};
          Arrays.fill(h,2,9,0);
          for(int g=0;g<h.length;g++) {
        	  System.out.print(h[g]+",");
          }
	}

}
